package com.siyu.preplan.planpmaterial.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.siyu.preplan.planpmaterial.mapper.PlanPMaterialMapper;
import com.siyu.preplan.planpmaterial.domain.PlanPMaterial;
import com.siyu.preplan.planpmaterial.service.IPlanPMaterialService;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.siyu.preplan.planpmaterial.mapper.PlanPMaterialMapper;
import com.siyu.preplan.planpmaterial.domain.PlanPMaterial;
import com.siyu.preplan.planpmaterial.service.IPlanPMaterialService;

/**
 * 预案结果救灾物资明细Service业务层处理
 *
 * @author hrhy
 * @date 2024-06-15
 */
@Service
public class PlanPMaterialServiceImpl extends ServiceImpl<PlanPMaterialMapper, PlanPMaterial> implements IPlanPMaterialService
{
    @Autowired
    private PlanPMaterialMapper planPMaterialMapper;

    /**
     * 查询预案结果救灾物资明细
     *
     * @param id 预案结果救灾物资明细主键
     * @return 预案结果救灾物资明细
     */
    @Override
    public PlanPMaterial selectPlanPMaterialById(String id)
    {
        return planPMaterialMapper.selectPlanPMaterialById(id);
    }

    /**
     * 查询预案结果救灾物资明细列表
     *
     * @param planPMaterial 预案结果救灾物资明细
     * @return 预案结果救灾物资明细
     */
    @Override
    public List<PlanPMaterial> selectPlanPMaterialList(PlanPMaterial planPMaterial)
    {
        return planPMaterialMapper.selectPlanPMaterialList(planPMaterial);
    }

    /**
     * 新增预案结果救灾物资明细
     *
     * @param planPMaterial 预案结果救灾物资明细
     * @return 结果
     */
    @Override
    public int insertPlanPMaterial(PlanPMaterial planPMaterial)
    {
            return planPMaterialMapper.insertPlanPMaterial(planPMaterial);
    }

    /**
     * 修改预案结果救灾物资明细
     *
     * @param planPMaterial 预案结果救灾物资明细
     * @return 结果
     */
    @Override
    public int updatePlanPMaterial(PlanPMaterial planPMaterial)
    {
        return planPMaterialMapper.updatePlanPMaterial(planPMaterial);
    }

    /**
     * 批量删除预案结果救灾物资明细
     *
     * @param ids 需要删除的预案结果救灾物资明细主键
     * @return 结果
     */
    @Override
    public int deletePlanPMaterialByIds(String[] ids)
    {
        return planPMaterialMapper.deletePlanPMaterialByIds(ids);
    }

    /**
     * 删除预案结果救灾物资明细信息
     *
     * @param id 预案结果救灾物资明细主键
     * @return 结果
     */
    @Override
    public int deletePlanPMaterialById(String id)
    {
        return planPMaterialMapper.deletePlanPMaterialById(id);
    }
}


